#ifndef _IFAPP_XML_CONF_H
#define _IFAPP_XML_CONF_H
#define DEV_INFO_NUM_LEN	16
#define DEV_INFO_PAR_LEN	128
#define DEV_INFO_PAR2_LEN       256
#define DEV_INFO_ADD_LEN	1024
#define MAX_FTP_FILES       8
#include "type.h"
#ifdef __cplusplus
extern "C" {
#endif

#include "cli_main.h"

#define REDIRECT_LIST_MAX       7

typedef struct {
    I8 *lvl2;
    I8 *lvl3;
    I8 *lvl4;
    I8 *name;
    I8 *data;
    I8 *type;
    I32 id;
} CNODE_INFO;


typedef struct {
    I8 devNum[DEV_INFO_PAR_LEN];
	I8 devNumRsv[DEV_INFO_PAR_LEN];
	I8 tempThreshold[DEV_INFO_PAR_LEN];
    I8 devName[DEV_INFO_PAR_LEN];
    I8 typemodel[DEV_INFO_PAR_LEN];
    I8 devtype[DEV_INFO_NUM_LEN];
    I8 phoneNum[DEV_INFO_NUM_LEN];
    I8 devAddr[DEV_INFO_ADD_LEN];
    I8 siteArea[DEV_INFO_NUM_LEN];
    I8 pos_lo[DEV_INFO_PAR_LEN];
    I8 pos_la[DEV_INFO_PAR_LEN];
    I8 pos_he[DEV_INFO_PAR_LEN];
    I8 gpsEnable[DEV_INFO_NUM_LEN];
    I8 uploadMode[DEV_INFO_NUM_LEN];
    I8 RFSwitch[DEV_INFO_NUM_LEN];	
    I8 protocol[DEV_INFO_NUM_LEN];
    I8 createTime[DEV_INFO_PAR_LEN];
} DEV_INFO;

typedef struct {
    I8 disable_auth[DEV_INFO_NUM_LEN]; // if select authentioncal  enter 0
    I8 cer_file[DEV_INFO_PAR_LEN];// the location of the certificate
    I8 addr[DEV_INFO_PAR_LEN];
    I8 port[DEV_INFO_NUM_LEN];
    I8 open_port[DEV_INFO_NUM_LEN];//use unencrypted port
    I8 hb[DEV_INFO_NUM_LEN];
    I8 itvl[DEV_INFO_NUM_LEN];  //heartbeat interval, or upload data interval
    I8 cycle[DEV_INFO_NUM_LEN]; //for mng server only , used for search each rru upload number 
    I8 enable[DEV_INFO_NUM_LEN];    //for data server only, other servers are not used.	
} SRV_INFO;

typedef struct {
    I8 enable[DEV_INFO_NUM_LEN];
    I8 EquipmentId[DEV_INFO_NUM_LEN];
    I8 PowerLevel[DEV_INFO_NUM_LEN];
    I8 band[DEV_INFO_NUM_LEN];
    I8 bcc[DEV_INFO_NUM_LEN];
    I8 mcc[DEV_INFO_NUM_LEN];
    I8 mnc[DEV_INFO_NUM_LEN];
    I8 lac[DEV_INFO_NUM_LEN];
    I8 nei[DEV_INFO_NUM_LEN];
    I8 rssi[DEV_INFO_NUM_LEN];
    I8 thld[DEV_INFO_NUM_LEN];
    I8 captime[DEV_INFO_NUM_LEN];
    I8 lowatt[DEV_INFO_NUM_LEN];
    I8 upatt[DEV_INFO_NUM_LEN];
    I8 cnum[DEV_INFO_NUM_LEN];
    I8 cro[DEV_INFO_NUM_LEN];
    I8 configMode[DEV_INFO_NUM_LEN];
    I8 workMode[DEV_INFO_NUM_LEN];
    I8 startFreq900[DEV_INFO_NUM_LEN];
    I8 endFreq900[DEV_INFO_NUM_LEN];
    I8 startFreq1800[DEV_INFO_NUM_LEN];
    I8 endFreq1800[DEV_INFO_NUM_LEN];
    I8 freqOffset[DEV_INFO_NUM_LEN];
} GSM_INFO;

typedef struct {
    I8 mcc[DEV_INFO_NUM_LEN];
    I8 mnc[DEV_INFO_NUM_LEN];
    I8 lac[DEV_INFO_NUM_LEN];
    I8 psc[DEV_INFO_NUM_LEN];
    I8 arfcn[DEV_INFO_NUM_LEN];
    I8 rac[DEV_INFO_NUM_LEN];
    I8 cellId[DEV_INFO_NUM_LEN];
    I8 autoLac[DEV_INFO_NUM_LEN];
    I8 dac[DEV_INFO_NUM_LEN];
    I8 txPower[DEV_INFO_NUM_LEN];
    I8 rxPower[DEV_INFO_NUM_LEN];
    I8 redirect[DEV_INFO_NUM_LEN];
    I8 bcc[DEV_INFO_NUM_LEN];
} WCDMA_INFO;

typedef struct {
    I8 mcc[DEV_INFO_NUM_LEN];
    I8 mnc[DEV_INFO_NUM_LEN];
    I8 lac[DEV_INFO_NUM_LEN];
    I8 psc[DEV_INFO_NUM_LEN];
    I8 arfcn[DEV_INFO_NUM_LEN];
    I8 rac[DEV_INFO_NUM_LEN];
    I8 cellId[DEV_INFO_NUM_LEN];
    I8 autoLac[DEV_INFO_NUM_LEN];
    I8 dac[DEV_INFO_NUM_LEN];
    I8 txPower[DEV_INFO_NUM_LEN];
    I8 rxPower[DEV_INFO_NUM_LEN];
    I8 redirect[DEV_INFO_NUM_LEN];
    I8 bcc[DEV_INFO_NUM_LEN];
} TDSCDMA_INFO;

typedef struct 
{
    I8 enable[DEV_INFO_NUM_LEN];
    I8 desc[DEV_INFO_NUM_LEN];
    I8 Operator[DEV_INFO_NUM_LEN];
    I8 IsMeasureEnable[DEV_INFO_NUM_LEN];
    I8 band[DEV_INFO_NUM_LEN];
    I8 bandWidth[DEV_INFO_NUM_LEN];
    I8 syncMode[DEV_INFO_NUM_LEN];
    I8 gpsTmDelay[DEV_INFO_NUM_LEN];
    I8 isSaveFs[DEV_INFO_NUM_LEN];
    I8 minRxLev[DEV_INFO_NUM_LEN];
    I8 minRxLevOffset[DEV_INFO_NUM_LEN];
    I8 configMode[DEV_INFO_NUM_LEN];
    I8 ul_earfcn[DEV_INFO_NUM_LEN];
    I8 dl_earfcn[DEV_INFO_NUM_LEN];
    I8 plmnid[DEV_INFO_PAR_LEN];
    I8 tac[DEV_INFO_NUM_LEN];
    I8 pci[DEV_INFO_NUM_LEN];
    I8 neiborcell[DEV_INFO_PAR_LEN];
    I8 abnorfreq[DEV_INFO_PAR_LEN];
	I8 freqList[DEV_INFO_PAR_LEN];
	I8 ctFreqList[DEV_INFO_PAR_LEN];
} LTE_INFO;

typedef struct {
    I8 bcc[DEV_INFO_NUM_LEN];
    I8 mcc[DEV_INFO_NUM_LEN];
    I8 mnc[DEV_INFO_NUM_LEN];
    I8 sid[DEV_INFO_NUM_LEN];
    I8 nid[DEV_INFO_NUM_LEN];
    I8 pn[DEV_INFO_NUM_LEN];
    I8 bsid[DEV_INFO_NUM_LEN];
    I8 regnum[DEV_INFO_NUM_LEN];
    I8 captime[DEV_INFO_NUM_LEN];
    I8 dnatt[DEV_INFO_NUM_LEN];
    I8 upatt[DEV_INFO_NUM_LEN];
    I8 workModel[DEV_INFO_NUM_LEN];
    I8 scanTime[DEV_INFO_NUM_LEN];
    I8 scanPeriod[DEV_INFO_NUM_LEN];
    I8 ResetModel[DEV_INFO_NUM_LEN];
    I8 freq1[DEV_INFO_NUM_LEN];
    I8 workMode1[DEV_INFO_NUM_LEN];
    I8 scantime1[DEV_INFO_NUM_LEN];
    I8 scancaptime1[DEV_INFO_NUM_LEN];
    I8 neibor1Freq1[DEV_INFO_NUM_LEN];
    I8 neibor2Freq1[DEV_INFO_NUM_LEN];
    I8 neibor3Freq1[DEV_INFO_NUM_LEN];
    I8 neibor4Freq1[DEV_INFO_NUM_LEN];
    I8 freq2[DEV_INFO_NUM_LEN];
    I8 workMode2[DEV_INFO_NUM_LEN];
    I8 scantime2[DEV_INFO_NUM_LEN];
    I8 scancaptime2[DEV_INFO_NUM_LEN];
    I8 neibor1Freq2[DEV_INFO_NUM_LEN];
    I8 neibor2Freq2[DEV_INFO_NUM_LEN];
    I8 neibor3Freq2[DEV_INFO_NUM_LEN];
    I8 neibor4Freq2[DEV_INFO_NUM_LEN];
    I8 freq3[DEV_INFO_NUM_LEN];
    I8 workMode3[DEV_INFO_NUM_LEN];
    I8 scantime3[DEV_INFO_NUM_LEN];
    I8 scancaptime3[DEV_INFO_NUM_LEN];
    I8 neibor1Freq3[DEV_INFO_NUM_LEN];
    I8 neibor2Freq3[DEV_INFO_NUM_LEN];
    I8 neibor3Freq3[DEV_INFO_NUM_LEN];
    I8 neibor4Freq3[DEV_INFO_NUM_LEN];
    I8 freq4[DEV_INFO_NUM_LEN];
    I8 workMode4[DEV_INFO_NUM_LEN];
    I8 scantime4[DEV_INFO_NUM_LEN];
    I8 scancaptime4[DEV_INFO_NUM_LEN];
    I8 neibor1Freq4[DEV_INFO_NUM_LEN];
    I8 neibor2Freq4[DEV_INFO_NUM_LEN];
    I8 neibor3Freq4[DEV_INFO_NUM_LEN];
    I8 neibor4Freq4[DEV_INFO_NUM_LEN];
} CDMA_INFO;

typedef struct 
{
    I8 workMode[DEV_INFO_NUM_LEN];
    I8 workPeriod[DEV_INFO_NUM_LEN];
    I8 powerOffTime[DEV_INFO_NUM_LEN];
} WORKMODE;

typedef struct 
{
    I8 isSupported[DEV_INFO_NUM_LEN];
	I8 enable[DEV_INFO_NUM_LEN];
    I8 tac_cycle[DEV_INFO_NUM_LEN];
	I8 snifferType[DEV_INFO_NUM_LEN];
	LTE_INFO lte[LTE_CELL_NUM];
} WIRELESS_LTE_INFO;

typedef struct {
    I8 isSupported[DEV_INFO_NUM_LEN];
    I8 enable[DEV_INFO_NUM_LEN];
    I8 intvl[DEV_INFO_NUM_LEN];
    GSM_INFO gsm1;
    GSM_INFO gsm2;
} WIRELESS_GSM_INFO;

typedef struct {
    I8 isSupported[DEV_INFO_NUM_LEN];
    I8 enable[DEV_INFO_NUM_LEN];
    I8 intvl[DEV_INFO_NUM_LEN];
    CDMA_INFO cdma;
} WIRELESS_CDMA_INFO;

typedef struct {
    I8 isSupported[DEV_INFO_NUM_LEN];
    I8 enable[DEV_INFO_NUM_LEN];
    I8 intvl[DEV_INFO_NUM_LEN];
    WCDMA_INFO wcdma;
} WIRELESS_WCDMA_INFO;

typedef struct {
    I8 isSupported[DEV_INFO_NUM_LEN];
    I8 enable[DEV_INFO_NUM_LEN];
    I8 intvl[DEV_INFO_NUM_LEN];
    TDSCDMA_INFO tdscdma;
} WIRELESS_TDSCDMA_INFO;

typedef struct {
    I8 isSupported[DEV_INFO_NUM_LEN];
    I8 enable[DEV_INFO_NUM_LEN];
    I8 intvl[DEV_INFO_NUM_LEN];
} WIRELESS_WIFI_INFO;

typedef struct {
    I8 enable[DEV_INFO_NUM_LEN];
    I8 gain[DEV_INFO_NUM_LEN];
} PA_INFO;

typedef struct {
    I8 enable[DEV_INFO_NUM_LEN];
    I8 msgEnable[DEV_INFO_NUM_LEN];
    I8 smsKey[DEV_INFO_NUM_LEN];
} SMS_INFO;

typedef struct {
	I8 phonenum[DEV_INFO_NUM_LEN];
	I8 message[DEV_INFO_PAR_LEN];
} MSSAGE_INFO;


typedef struct {
    I8 hour[DEV_INFO_NUM_LEN];
    I8 min[DEV_INFO_NUM_LEN];
    I8 sec[DEV_INFO_NUM_LEN];
} SNF_TM_INFO;

typedef struct {
	I8 cellIdx[DEV_INFO_NUM_LEN];
    I8 enable[DEV_INFO_NUM_LEN];
    I8 freqScope[DEV_INFO_PAR_LEN];
    I8 bccMode[DEV_INFO_NUM_LEN];
    I8 isAuto[DEV_INFO_NUM_LEN];
    I8 hour[DEV_INFO_NUM_LEN];
    I8 min[DEV_INFO_NUM_LEN];
    I8 sec[DEV_INFO_NUM_LEN];
    I8 cycle[DEV_INFO_NUM_LEN];
} SNF_INFO;


typedef struct {
    I8 enable[DEV_INFO_NUM_LEN];
    I8 freqScope[DEV_INFO_PAR_LEN];
    I8 bccMode[DEV_INFO_NUM_LEN];
    I8 isAuto[DEV_INFO_NUM_LEN];
    SNF_TM_INFO snf_tm[CELL_NUM];
    I8 cycle[DEV_INFO_NUM_LEN];
} SNF_LTE_INFO;

typedef struct {
    I8 peroid[DEV_INFO_NUM_LEN];
} STORAGE_INFO;

typedef struct {
    I8 enable[DEV_INFO_NUM_LEN];
    I8 hour[DEV_INFO_NUM_LEN];
    I8 min[DEV_INFO_NUM_LEN];
} RESTART_INFO;

typedef struct {
    I8 ftpenable[DEV_INFO_NUM_LEN];
    I8 ftpMacenable[DEV_INFO_NUM_LEN];
    I8 ftpMactimer[DEV_INFO_NUM_LEN];
    I8 ftpMacmaxcount[DEV_INFO_NUM_LEN];
    I8 ftpserver[DEV_INFO_PAR_LEN];
    I8 ftpuser[DEV_INFO_PAR_LEN];
    I8 ftppasswd[DEV_INFO_PAR_LEN];
    I8 ftpport[DEV_INFO_NUM_LEN];
    I8 ftptimer[DEV_INFO_NUM_LEN];
    I8 ftpmaxcount[DEV_INFO_NUM_LEN];
    I8 ftpbsic[DEV_INFO_PAR_LEN];
    I8 ftpcompany[DEV_INFO_PAR_LEN];
    I8 ftpplaceCode[DEV_INFO_NUM_LEN];
    I8 ftpplaceName[DEV_INFO_PAR2_LEN];
    I8 ftpcompanyName[DEV_INFO_PAR2_LEN];
    I8 ftpcompanyAddr[DEV_INFO_ADD_LEN];
    I8 ftpcontactor[DEV_INFO_PAR2_LEN];
    I8 ftpcontactorTel[DEV_INFO_PAR_LEN];
    I8 ftpcontactorMail[DEV_INFO_PAR_LEN];
    I8 ftpKey[DEV_INFO_PAR2_LEN];
    I8 ftpIV[DEV_INFO_PAR2_LEN];
    I8 ftpDataSource[DEV_INFO_PAR_LEN];
    I8 ftpDataDest[DEV_INFO_PAR_LEN];
    I8 ftpSingleFileNum[DEV_INFO_NUM_LEN];
    I8 ftpCompressFileNum[DEV_INFO_NUM_LEN];
    I8 ftpcityNum[DEV_INFO_PAR_LEN];
    I8 ftpuptime[DEV_INFO_NUM_LEN];
    I8 ftpdir[DEV_INFO_PAR_LEN];
} FTP_INFO;

typedef struct {
	I8   wirelessSupported[12];
	SNF_INFO gsmSniffer[2];
	SNF_LTE_INFO lteSniffer[7];
    WIRELESS_GSM_INFO capGsm;
    WIRELESS_LTE_INFO capLte;
    WIRELESS_CDMA_INFO capCdma;
    WIRELESS_WCDMA_INFO capWcdma;
    WIRELESS_TDSCDMA_INFO capTdscdma;
    WIRELESS_WIFI_INFO capWifi;
}WIRELESS_INFO;

typedef struct {
    DEV_INFO dev;
    WORKMODE workMode;
    WIRELESS_GSM_INFO capGsm;
    WIRELESS_LTE_INFO capLte;
    WIRELESS_CDMA_INFO capCdma;
    WIRELESS_WCDMA_INFO capWcdma;
    WIRELESS_TDSCDMA_INFO capTdscdma;
    WIRELESS_WIFI_INFO capWifi;
    PA_INFO pa[PA_NUM];
    FTP_INFO ftp;
    UE_REDIRECT redirect[REDIRECT_LIST_MAX];
    SMS_INFO sms;
    SRV_INFO auth;
    SRV_INFO mng;
    SRV_INFO data;
    SNF_INFO snfGsm;
    SNF_LTE_INFO snfLte;
    STORAGE_INFO storage;
    RESTART_INFO restart;
} DEV_CONF;

extern DEV_CONF dev_conf;

typedef struct {
    I8 url[DEV_INFO_PAR_LEN];
    I8 patch[DEV_INFO_PAR_LEN];
	I8 md5sum[DEV_INFO_PAR_LEN];
}UPGRADE_INFO;

typedef struct {
    SRV_INFO *auth;
    SRV_INFO *mng;
    SRV_INFO *data;
    SRV_INFO *local;
}NETWORK_CONF_PTR;

typedef struct 
{
	U32 wARFCN;
	U32 wBSIC;
	U16 wLAC;
	I32  cC1;
	I32  bC2;
    I32  cRSSI;    
	I8  wPlmnid[7];
}gsmCellResult;

typedef struct
{
	U32		        cellNum;
	gsmCellResult   cell[32];
}gsmSnifferResult;

typedef struct {
	U16 cellIdx;
    U16 enable;
    U16 bccMode;
    U16 isAuto;
    U16 hour;
    U16 min;
    U16 sec;
    U16 coupleNum;
    U16 startFreq[8];    
    U16 endFreq[8];     
    U32 cycle;   
}SnifferConfig;

typedef struct {
    U16 isSupported;
    U16 enable;
    U16 band;
    U16 bcc;
    U16 mcc;
    U16 mnc;
    U16 lac;
    U16 captime;
    U16 lowatt;
    U16 upatt;
    U16 configMode;
    U16 PowerLevel;
}gsmRadioConfig;

typedef struct {
    U16  isSupported;
    U16  enable;
    U32  intvl;
    gsmRadioConfig gsm[2];
} gsmConfig;

typedef struct {
    U16 isSupported;
    U16 enable;
    U16 mcc;
    U16 mnc;
    U16 lac;
    U16 psc;
    U16 arfcn;
    U16 rac;
    U16 cellId;
    U16 autoLac;
} wcdmaRadioConfig;

typedef struct 
{
    U16 isSupported;
    U16 enable;
    U8  desc[4];
    U16 Operator;
    U16 band;
    U16 bandWidth;
    U16 syncMode;
    I32 gpsTmDelay;
    U16 ul_earfcn;
    U16 dl_earfcn;
    U32 plmnid;
    U16 tac;
    U16 pci;
    I8  isSaveFs;
    I8  neiborcell[DEV_INFO_PAR_LEN];
    I8  abnorfreq[DEV_INFO_PAR_LEN];
} lteRadioConfig;

typedef struct 
{
    U16  isSupported;
    U16  enable;
    U32  intvl;
    lteRadioConfig lte[7];
} lteConfig;

typedef struct {
    U16 enable;
    U16 bcc;
    U16 mcc;
    U16 mnc;
    U16 sid;
    U16 nid;
    U16 pn;
    U16 bsid;
    U16 regnum;
    U16 captime;
    U16 dnatt;
    U16 upatt;
    U16 workModel;
    U16 scanTime;
    U16 scanPeriod;
    U16 ResetModel;
    U16 freq1;
    U16 workMode1;
    U16 scantime1;
    U16 scancaptime1;
    U16 neibor1Freq1;
    U16 neibor2Freq1;
    U16 neibor3Freq1;
    U16 neibor4Freq1;
    U16 freq2;
    U16 workMode2;
    U16 scantime2;
    U16 scancaptime2;
    U16 neibor1Freq2;
    U16 neibor2Freq2;
    U16 neibor3Freq2;
    U16 neibor4Freq2;
    U16 freq3;
    U16 workMode3;
    U16 scantime3;
    U16 scancaptime3;
    U16 neibor1Freq3;
    U16 neibor2Freq3;
    U16 neibor3Freq3;
    U16 neibor4Freq3;
    U16 freq4;
    U16 workMode4;
    U16 scantime4;
    U16 scancaptime4;
    U16 neibor1Freq4;
    U16 neibor2Freq4;
    U16 neibor3Freq4;
    U16 neibor4Freq4;
} cdmaRadioConfig;

typedef struct {
    U16 isSupported;
    U16 enable;
    U32 intvl;
} wifiRadioConfig;

typedef struct {
	U8               wirelessSupported[CELL_NUM];
	SnifferConfig    snfConfig[CELL_NUM];
    gsmConfig 		 capGsm;
    cdmaRadioConfig  capCdma;
    lteConfig    	 capLte;
    wcdmaRadioConfig capWcdma;
    wcdmaRadioConfig capTdscdma;
    wifiRadioConfig  capWifi;
}WirelessConfig;

typedef struct {
    U16 port;
    U16 times;
    I8 server[DEV_INFO_PAR2_LEN];
    I8 user[DEV_INFO_PAR_LEN];
    I8 passwd[DEV_INFO_PAR_LEN];
} FTPLOG;

typedef struct {
    I8 fileName[DEV_INFO_PAR_LEN];
    I32 fileRows;
} KUANGAUNGFILE;

typedef struct {
    KUANGAUNGFILE ftpFiles[MAX_FTP_FILES];
    I32 fileNum;
    I32 uploadType;
} KAUNGAUNG_FTP;

typedef struct {
    I8 version[DEV_INFO_NUM_LEN];
    I8 buildDate[DEV_INFO_PAR_LEN];
    I8 buildTime[DEV_INFO_NUM_LEN];
} VERSION;
extern FTPLOG ftpLog;
extern VERSION devVersion;
#define CAIPIN "caipin"
#define CAIPINNEW "caipinNew"
#define ZHIHUI "zhihui"
#define XINAN  "xinan"
#define LEGU   "legu"
#define KUANGUANG "kuanguang"
#define ZHONGDUN "zhongdun"
#define HUANSHUO "huanshuo"
#define	WANGXUN	"wangxun"
#define BAIZHUO  "baizhuo"
#define FENGHUO	"fenghuo"
#define RENZIXING "renzixing"
#define JINFENG   "jinfeng"
#define GAOKE     "gaoke"
#define NANFEI    "nanfei"
#define LOCATION "location"
#define ZISHUO "zishuo"

#define REQUEST_UPDATA_SRV		    0x80004
#define REQUEST_UPDATA_CLI_MASK	    0x80000

#define REQUEST_UPDATA_NONE		    0x10000
#define REQUEST_UPDATA_DATA_H	    0x11001
#define REQUEST_UPDATA_DATA_I	    0x11002
#define REQUEST_UPDATA_MNG_H	    0x11003
#define REQUEST_UPDATA_MNG_I	    0x11004
#define REQUEST_UPDATA_AUTH_H	    0x11005
#define REQUEST_SRV_HB_MASK		    0x11000

#define REQUEST_UPDATA_DATA_EN	    0x12000
#define REQUEST_UPDATA_MNG_EN	    0x12001
#define REQUEST_UPDATA_IF_APP	    0x10000


#define REQUEST_UPDATA_DATA_CYCLE   0x11006
#define REQUEST_UPDATA_TAC_CYCLE    0x11007


#define REQUEST_UPDATA_PA_GAIN	    0x21016


#define REQUEST_UPDATA_REBOOT	    0x21000
#define REQUEST_UPDATA_SMS_SND	    0x21001
#define REQUEST_UPDATA_TIME		    0x21002
#define REQUEST_UPDATA_SLEEP	    0x21003
#define REQUEST_UPDATA_WAKEUP	    0x21004
#define REQUEST_FACTORY_DEFAULT	    0x21005
#define REQUEST_INTERNAL_HEARTBEAT  0x21026

#define REQUEST_SOFTWARE_UPDATA	    0x21007
#define REQUEST_UPDATA_DEV_MASK	    0x20000

#define REQUEST_UPDATA_SMS          0x21008
#define REQUEST_UPDATA_STORAGE	    0x21009
#define REQUEST_UPDATA_SMS_MSG      0x2100a
#define REQUEST_UPDATA_SMS_KEY      0x2100b
#define REQUEST_UPDATA_SYS_RBEOOT   0x2100c
#define REQUEST_SET_VAILD_PA        0x2100d
#define REQUEST_UPGRADE_X86         0x2100e
#define REQUEST_SET_UPLOAD_MODE     0x2100f
#define REQUEST_SR_DEVICE_LOG       0x21010
#define REQUEST_ADD_BLACKLIST       0x21011
#define REQUEST_DEL_BLACKLIST       0x21012
#define REQUEST_SR_BLACKLIST        0x21013
#define REQUEST_SR_BLACKLIST_STOP   0x21014
#define REQUEST_SR_BLACKLIST_INACK  0x21015
#define REQUEST_PA_POWER_ON         0x21016
#define REQUEST_PA_POWER_OFF        0x21017
#define REQUEST_FTP_REPORT_DATA_ON  0x21018
#define REQUEST_FTP_REPORT_DATA_OFF 0x21019
#define REQUEST_CFG_NTP_SERVER      0x2101a
#define REQUEST_REBOOT_DEVICE       0x2101b
#define REQUEST_REMOTE_SSH_ON       0x2101c
#define REQUEST_REMOTE_SSH_OFF      0x2101d
#define REQUEST_CLEAN_DATA	        0x2101e

//here is lte
#define REQUEST_BBU1_INIT_CONFIG    0x22000
#define REQUEST_BBU2_INIT_CONFIG    0x22001
#define REQUEST_BBU3_INIT_CONFIG    0x22002
#define REQUEST_BBU4_INIT_CONFIG    0x22003
#define REQUEST_BBU5_INIT_CONFIG    0x22004
#define REQUEST_BBU6_INIT_CONFIG    0x22005
#define REQUEST_BBU7_INIT_CONFIG    0x22006

#define REQUEST_BBU_TX_POWER1       0x22007
#define REQUEST_BBU_TX_POWER2       0X22008
#define REQUEST_BBU_TX_POWER3       0x22009
#define REQUEST_BBU_TX_POWER4       0x2200a
#define REQUEST_BBU_TX_POWER5       0x2200b
#define REQUEST_BBU_TX_POWER6       0x2200c
#define REQUEST_BBU_TX_POWER7       0x2200d

#define REQUEST_EUTRAN_TX_POWER_CONFIG 0x2200e  

#define REQUEST_BBU1_RSSI_CONFIG    0X2200f
#define REQUEST_BBU2_RSSI_CONFIG    0X22010
#define REQUEST_BBU3_RSSI_CONFIG    0X22011
#define REQUEST_BBU4_RSSI_CONFIG    0X22012
#define REQUEST_BBU5_RSSI_CONFIG    0X22013
#define REQUEST_BBU6_RSSI_CONFIG    0X22014
#define REQUEST_BBU7_RSSI_CONFIG    0x22015

#define REQUEST_EUTRAN_MANUAL_SNIFFER	 0x22016
#define REQUEST_EUTRAN_CONFIG_CELL  0x22017
#define REQUEST_EUTRAN_UPDATA_CELL  0x22018
#define REQUEST_EUTRAN_SNIFFER	    0x22019

#define REQUEST_UPDATA_REDET	    0x2201a 
#define REQUEST_UPDATA_SNF_PAR	    0x2201b

#define REQUEST_EUTRAN_BBU_SYNC_MODE 0x2201c
#define REQUEST_EUTRAN_BBU_UPGRADE  0x2201d
#define REQUEST_EUTRAN_BBU_REBOOT   0x2201e


#define REQUEST_EUTRAN_BBU_SET_IP   0x2201f
#define REQUEST_EUTRAN_INIT_CONFIG  0x22020
#define REQUEST_EUTRAN_STOP_SNIFFER 0x22021
#define REQUEST_EUTRAN_RESET_SNIFFER 0x22022
#define REQUEST_UPDATA_PA_ON        0x22023
#define REQUEST_UPDATA_PA_OFF       0x22024 
#define REQUEST_UPDATA_TX_POWER     0x22025

#define REQUEST_UE_FILTER_ON        0x22026
#define REQUEST_UE_FILTER_OFF       0x22027

#define REQUEST_ADD_WHITELIST       0x22028
#define REQUEST_DEL_WHITELIST       0x22029

#define REQUEST_SET_BLACKLIST_ON    0x2202a
#define REQUEST_SHUTDOWN_ALLPOWER   0x2202b
#define REQUEST_BBU_RADIO_OFF       0x2202c
#define REQUEST_BBU_RADIO_ON        0x2202d
#define REQUEST_EUTRAN_AUTO_SNIFFER_PAR  0x2202e

#define REQUEST_MANUAL_REBOOT_BBU   0x2202f
#define REQUEST_UPDATA_WIFI         0x22030
 
#define REQUEST_UE_REDIRECT_ON      0x22031
#define REQUEST_UE_REDIRECT_OFF     0x22032
#define REQUEST_UPDATA_SHUTDOWN_TX_POWER  0x22033
#define REQUEST_LTE_SNIFFER         0x22034
#define REQUEST_LTE_OPEN_ALL_POWER   0x22035
#define REQUEST_LTE_ALL_CONFIG       0x22036
#define REQUEST_EUTRAN_BBU_SCAN_ON   0x22037
#define REQUEST_EUTRAN_BBU_SCAN_OFF  0x22038
#define REQUEST_TDD_LOCATION_ON      0x22039
#define REQUEST_TDD_LOCATION_OFF     0x2203a
#define REQUEST_FDD_LOCATION_ON		 0x2203b
#define REQUEST_FDD_LOCATION_OFF     0x2203c
#define REQUEST_FDD_MODE             0x2203d
#define REQUEST_SET_LOCATION_MODE    0x2203e

//here is gsm
#define REQUEST_UPDATA_GSM1               0x23001
#define REQUEST_UPDATA_GSM2               0x23002
#define REQUEST_UPDATA_GSM_ENABLE         0x23003
#define REQUEST_UPDATA_GSM_SNIFER	      0x23004
#define REQUEST_UPDATA_GSM_SNIFER_PAR     0x23005
#define REQUEST_UPDATA_GSM_REDET	      0x23006
#define REQUEST_GSM_MANUAL_SNIFFER	      0x23007
#define REQUEST_UPDATA_GSM_PA             0x23008
#define REQUEST_UPDATA_GSM_CFG            0x23009
#define REQUEST_GSM_REBOOT                0x2300a
#define REQUEST_GSM_UPGRADE               0x2300b
#define REQUEST_GSM_GET_VERSION           0x2300c

//here is cdma
#define REQUEST_UPDATA_CDMA         0x24001
#define REQUEST_UPDATA_CDMA_WIFI    0x24002
#define REQUEST_UPDATA_CDMA_SNIFER	    0x24003
#define REQUEST_UPDATA_CDMA_SNIFER_PAR   0x24004
#define REQUEST_UPDATA_CDMA_REDET	    0x24005
#define REQUEST_UPDATA_CDMA_PA           0x24006
#define REQUEST_CDMA_REBOOT              0x24007

#define REQUEST_UPDATA_WCDMA        0x25001
#define REQUEST_UPDATA_WCDMA_REDET  0x25002
#define REQUEST_UPDATA_WCDMA_ENABLE 0x25003
#define REQUEST_WCDMA_REBOOT        0x25004
#define REQUEST_SHUTDOWN_WCDMA_POWER  0x25005
#define REQUEST_WCDMA_SNIFFER       0x25006

#define REQUEST_UPDATA_TDSCDMA      0x26001
#define REQUEST_UPDATA_TDSCDMA_REDET 0x26002
#define REQUEST_UPDATA_TDSCDMA_ENABLE 0x26003
#define REQUEST_TDSCDMA_REBOOT      0x26004

#define REQUEST_UPDATA_WIFI_CFG     0x27001
#define REQUEST_UPDATA_WIFI_REDET   0x27002

#define REQUEST_REDIRECT_INIT_CONFIG 0x28001

#define REQUEST_UPDATE_GET_DATA	    0x40000
#define REQUEST_UPDATA_IND_ACK	    0x40001
#define REQUEST_UPDATA_STOP		    0x40002
#define REQUEST_GET_STATUS		    0x40003


#define REQUEST_SR_MASK             0x60000
#define REQUEST_SR_GPSINFO          0x60001
#define REQUEST_EUTRAN_BBU_STATE    0X60002
#define REQUEST_EUTRAN_SHOW_BBU_INFO 0x60003
#define REQUEST_EUTRAN_GET_BBU_SYNC 0x60004
#define REQUEST_EUTRAN_SOFTWARE_VERSION 0x60005
#define REQUEST_EUTRAN_GET_SNIFFER_STATUS 0x60006
#define REUQEST_EUTRAN_GET_SNIFFER_RESULT 0x60007
#define REQUEST_EUTRAN_GET_RSSI    0x60008
#define REQUEST_GET_SYS_INFO	    0x60009


#define REQUEST_SR_LOCAL_MASK       0x100000
#define REQUEST_SR_CELL_FREQ        0x100001
#define REQUEST_SR_BBU_CFG          0x100002
#define REQUEST_SR_TOTAL_CFG        0x100003
#define REQUEST_SR_TOTALCFG_MNG     0x100004
#define REQUEST_SR_FTP_INFO         0x100005
#define REQUEST_SR_X86_CFG          0x100006
#define REQUEST_SR_X86_CURRENT_TIME 0x100007
#define REQUEST_SR_RESTART_TIME     0x100008
#define REQUEST_SR_NTP_SERVER       0x100009
#define REQUEST_SR_GSM_SNIFFER_TIME 0x10000a
#define REQUEST_SR_TIME_REPEAT      0x10000b
#define REQUEST_SR_TAC_CYCLE        0x10000c
#define REQUEST_SR_ONE_DAY_RECORD   0x10000d
#define REQUEST_SR_RECORD_BY_SEQ    0x10000e
#define REQUEST_SR_RECORD_END       0x10000f
#define REQUEST_CLEAN_FEP_DATA      0x100010
#define REQUEST_SR_ONE_RECORD       0X100011
#define REQUEST_SR_50_DAY_RECORD    0x100012
#define REQUEST_SEND_UPGRADE_PACKET 0x100013

#define REQUEST_SR_ALL_BBU_CONFIG   0x100014
#define REQUEST_SR_DEVICE_USAGE     0x100015
#define REQUEST_SR_LOCATION_STATUS  0x100016
#define REQUEST_SR_HW_ID			0x100017
#define REQUEST_SR_SERVER_RESART_SNF	0x100018
#define REQUEST_SR_BOARDCARD_INFO	0x100019

I32 xml_handle_conf(I8 *buf_tmp, I32 module);
I32 xml_get_devConf(DEV_CONF * info);

#define CONFIG_MODE_BACKUP	1
#define CONFIG_MODE_RESTORE	0
#define CONFIG_MODE_CP_FIREST 2
I32 xml_config_overwirte(I32 mode);
void xml_cp_old_config();
void xml_cp_unchang_config();
void xml_show_conf(void);
void conversionConfig(WirelessConfig *config);
I32 CreateKuanGuangXmlFile(KAUNGAUNG_FTP *kaunGuangFtp);
I32 CreateFengHuoDataXmlFile(KAUNGAUNG_FTP *fengHuoFtpData);
I32 CreateFengHuoDataPlaceXmlFile(KAUNGAUNG_FTP *fengHuoFtpData);
I32 CreateFengHuoDataFirmXmlFile(KAUNGAUNG_FTP *fengHuoFtpData);
I32 CreateFengHuoDataTerminalXmlFile(KAUNGAUNG_FTP *fengHuoFtpData);
I32 CreateFengHuoDataMacXmlFile(KAUNGAUNG_FTP *fengHuoFtpData);

#ifdef __cplusplus
}
#endif
#endif
